1. Technology Field
The present invention is directed to a method of storing system data and a memory controller and a memory storage apparatus using the same.
2. Description of Related Art
Along with the widespread of digital cameras, cell phones, and MP3 in recently years, the consumers' demand for storage media has increased drastically. Since a rewritable non-volatile memory has the characteristics of non-volatility of data, low power consumption, small volume, non-mechanical structure, and fast reading and writing speed, the rewritable non-volatile memory is the most adaptable memory applied in a portable electronic product, e.g., a notebook computer. A solid state drive (SSD) is a storage apparatus which utilizes a flash memory as its storage medium. Therefore, the flash memory industry has become a very popular part of the electronic industry in recent years.
The flash memory has a plurality of physical blocks, and each of the physical blocks has a plurality of physical pages, wherein data has to be written to the physical block according to a sequence of the physical pages. Moreover, the physical pages where data has been written have to be erased first for again writing data thereto. Particularly, the physical block is the smallest unit that can be erased, and the physical page is the smallest unit that can be programmed. Therefore, typically, the physical blocks of the flash memory are mapped in alternation to logical addresses accessed by the host system so as to store data to be written by the host system. In order to effectively manage the physical blocks storing data in alternation, the memory controller establishes related management information (e.g. a mapping table) according to the standards of the flash memory when the flash memory storage apparatus is initialized and updates and maintains the same when the memory storage apparatus is in operation. For instance, the memory controller records the management information in one or more physical blocks (also referred to as system physical blocks). When no storage space is available for the system physical block, the memory controller configures another empty physical block as a new system physical block to write new management information and performs the erasing operation on the old system physical block.
However, during the operation of the memory storage apparatus, a power failure may occur, which results in a data write failure and the physical block incompletely storing data. Specifically, if the newly stored management information contains too many error bits due to the power failure and the old management information has been erased, the memory controller can not load any management information so that the memory storage apparatus is unable to operate normally. Accordingly, how to securely store the management information for the flash memory is one of the major concerns of artisans in the technical field.
Nothing herein should be construed as an admission of knowledge in the prior art of any portion of the present invention. Furthermore, citation or identification of any document in this application is not an admission that such document is available as prior art to the present invention, or that any reference forms a part of the common general knowledge in the art.